<?php

namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class BoxProductResource extends JsonResource
{
    public function toArray($request)
    {
    	$resource = $this->resource;
    	
        $data = [
        	'id' => $resource->id,
	        'level_name' => $resource->name,
            'rate' => $resource->rate,
            'image' => img_path($resource->image),
	        'product' => $resource->product,
        ];
        
        return $data;
    }
}
